<template>
	<view>
		<view class="uni-input">
			<uni-data-picker placeholder="请选择" :clear-icon="false" popup-title="请选择" :localdata="range" v-model="actPicker"
				:map="{text:'name',value:'id'}"></uni-data-picker>
			<uni-icons type="right" color="#999" size="16"></uni-icons>
		</view>
	</view>
</template>

<script>
	export default {
		model: {
			event: 'inputFun',
		},
		props: ['Radio', 'inputName', 'range'],
		data() {
			return {
				actPicker: '',

			}
		},
		watch: {
			inputName(newVal) {
				if (this.inputName) {
					this.actPicker = this.inputName
				}
			},
			actPicker(newVal) {
				if (this.actPicker) {
					this.actPicker = this.actPicker
					this.$emit('inputFun', this.actPicker)

				}
			},
		},
		mounted() {
			if (this.inputName) {
				this.actPicker = this.inputName
			}
		},

	}
</script>

<style lang="less" scoped>
	.uni-input {
		display: flex;
		justify-content: right;
		align-items: center;
		height: 100%;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;

		.placeholder {
			color: #999;
		}
	}

	/deep/.selected-area {
		justify-content: right;
	}

	/deep/.selected-list {
		justify-content: right;
	}

	/deep/.input-value {
		border: none !important;
		padding: 0;
	}

	/deep/.arrow-area {
		display: none;
	}

	/deep/.placeholder {
		color: #999;
		font-size: 30rpx;
		font-weight: 500;
	}

	/deep/.uni-data-tree {
		.uni-data-tree-input {
			.input-value {
				.uni-scroll-view-content {
					.selected-list {
						.selected-item {
							display: none;

							&:last-child {
								display: block !important;
							}
						}
					}
				}
			}
		}
	}
</style>